package com.hulman.oms.config;

import io.swagger.v3.oas.models.ExternalDocumentation;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class Knife4jConfig
{

    @Bean
    public OpenAPI springShopOpenAPI() {
        return new OpenAPI()
                .info(new Info().title("Spring Boot 3 Knife4j API文档")
                        .description("这是一个基于Knife4j OpenAPI 3的测试接口文档")
                        .version("1.0.0")
                        .contact(new Contact().name("开发者").email("developer@example.com")))
                .externalDocs(new ExternalDocumentation()
                        .description("更多文档信息")
                        .url("http://example.com/docs"));
    }
}
